package com.ruoyi.lhb.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.lhb.mapper.ExpatriaterecordsMapper;
import com.ruoyi.lhb.domain.Expatriaterecords;
import com.ruoyi.lhb.service.IExpatriaterecordsService;

/**
 * 外派记录Service业务层处理
 *
 * @author lhb
 * @date 2022-09-28
 */
@Service
public class ExpatriaterecordsServiceImpl implements IExpatriaterecordsService
{
    @Autowired
    private ExpatriaterecordsMapper expatriaterecordsMapper;

    /**
     * 查询外派记录
     *
     * @param expatriateid 外派记录主键
     * @return 外派记录
     */
    @Override
    public Expatriaterecords selectExpatriaterecordsByExpatriateid(Long expatriateid)
    {
        return expatriaterecordsMapper.selectExpatriaterecordsByExpatriateid(expatriateid);
    }

    /**
     * 查询外派记录列表
     *
     * @param expatriaterecords 外派记录
     * @return 外派记录
     */
    @Override
    public List<Expatriaterecords> selectExpatriaterecordsList(Expatriaterecords expatriaterecords)
    {
        return expatriaterecordsMapper.selectExpatriaterecordsList(expatriaterecords);
    }

    /**
     * 新增外派记录
     *
     * @param expatriaterecords 外派记录
     * @return 结果
     */
    @Override
    public int insertExpatriaterecords(Expatriaterecords expatriaterecords)
    {
        return expatriaterecordsMapper.insertExpatriaterecords(expatriaterecords);
    }

    /**
     * 修改外派记录
     *
     * @param expatriaterecords 外派记录
     * @return 结果
     */
    @Override
    public int updateExpatriaterecords(Expatriaterecords expatriaterecords)
    {
        return expatriaterecordsMapper.updateExpatriaterecords(expatriaterecords);
    }

    /**
     * 批量删除外派记录
     *
     * @param expatriateids 需要删除的外派记录主键
     * @return 结果
     */
    @Override
    public int deleteExpatriaterecordsByExpatriateids(Long[] expatriateids)
    {
        return expatriaterecordsMapper.deleteExpatriaterecordsByExpatriateids(expatriateids);
    }

    /**
     * 删除外派记录信息
     *
     * @param expatriateid 外派记录主键
     * @return 结果
     */
    @Override
    public int deleteExpatriaterecordsByExpatriateid(Long expatriateid)
    {
        return expatriaterecordsMapper.deleteExpatriaterecordsByExpatriateid(expatriateid);
    }
}
